package com.lukebang.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lukebang.pojo.Location;
import com.lukebang.service.ILocationService;

/**
 * 
 * LocationForController 上午10:44:28
 * 
 * Copyright zhaocj Inc. All rights reserved.
 * Love ME Like Justin Bieber.
 */

@Controller
@RequestMapping("/location")
public class LocationForController {
	@Resource
	private ILocationService locationSER;

	/**
	 * 查询所有的位置
	 * @return
	 */
	@RequestMapping("queryAllLocation")
	public @ResponseBody List<Location> queryAllLocation() {
		List<Location> locations = null;
		try {
			locations = locationSER.selectAllLocation();
			return locations;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
